Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(google-common,google-*) Gemini 2.0 support #7435

Merged
merged 11 commits into from
Dec 30, 2024

Conversation

afirstenberg
Copy link
Contributor

Assorted updates, primarily to support Gemini 2.0 (fixes #7345)

Some things to note:

  • The tests against "gemini-2.0-flash-thinking-exp" have been commented out. While it works for some things, this model doesn't support tools yet, and we need to look at how to handle the reasoning tokens which are provided. (See google-common: Support Gemini 2.0 Thinking model #7434)
  • Functions work with Gemini 2.0, however the prompting for them is more finicky, at least with the configuration used in the testing. (See https://issuetracker.google.com/issues/384752742 where I've opened the issue with Google.) But the functionality itself works.
  • This does not account for multimodal outputs, which are expected "soon". Can't do anything with that till we get official info on how it will work.

Possible tweaks for functions under gemini-2.0-flash-exp
Add Gemini 2.0 googleSearch support.
Add configuration to determine if the search request should be modified based on the model.
…orms. (There are some known, and expected, failures.)
@dosubot dosubot bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Dec 27, 2024
Copy link

vercel bot commented Dec 27, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
langchainjs-docs ✅ Ready (Inspect) Visit Preview Dec 30, 2024 6:06pm
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
langchainjs-api-refs ⬜️ Ignored (Inspect) Dec 30, 2024 6:06pm

@dosubot dosubot bot added the auto:improvement Medium size change to existing code to handle new use-cases label Dec 27, 2024
@afirstenberg afirstenberg changed the title Gemini 2.0 support fix(google-common,google-*) Gemini 2.0 support Dec 27, 2024
Copy link
Collaborator

@jacoblee93 jacoblee93 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small nit, I can fix myself

Otherwise LGTM thank you!

libs/langchain-google-common/src/utils/common.ts Outdated Show resolved Hide resolved
@jacoblee93 jacoblee93 merged commit ed63546 into langchain-ai:main Dec 30, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto:improvement Medium size change to existing code to handle new use-cases size:XXL This PR changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

google-common: Verify REST compatibility for Gemini 2.0
2 participants